#ifndef __PROCESS_H_
#define __PROCESS_H_

#define MAXFILENAMESIZE		(255+1)

typedef enum {
	
	WAIT,
	RUN,
	FINISHED
	
}State;

typedef struct process{			//the define of the process's struct
	int jid;		//the number of a job, jid must greater than 0
	int pid;		//the pid of the job, no less than 0
	int rate;
	State state;
	char rsltfile[MAXFILENAMESIZE];
}Process, *ProcessPtr;

//////////////////////////////////////////////////////////
int init_PQueue();
int add_new(Process p);		//add a new job after rear node
int run();
int stop();
int pauseCurrent();
int releaseChild();
int search(ProcessPtr p);
int deleteFromList(int jid);
int choose();
Process choose_p();
Process getCurrentProcess();
int isEmpty();

#endif
